//  同步模式下的执行顺序

console.log('global begin')
function bar(){
    console.log('bar task')
}
function foo () {
    console.log('foo task')
    bar()
}
foo()
console.log('global end')

/* 
-------- console start  --------
    global begin
    foo task
    bar task
    global end
-------- console end  --------
 
-------- Call stack start -------- 
任何函数的声明和任何变量的声明都不会压入调用栈（Call Stack
    console.log('global begin')
    1 - foo()
    console.log('foo task')
    2 - bar()
    console.log('bar task')
    console.log('global end')
-------- call stack end --------
*/
